<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>bosdyn.choreography.client.choreography &mdash; Spot 5.0.1.1 documentation</title>
      <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
      <link rel="stylesheet" href="../../../../_static/style.css" type="text/css" />
    <link rel="shortcut icon" href="../../../../_static/bd-favicon.png"/>
    <link rel="canonical" href="https://dev.bostondynamics.com/_modules/bosdyn/choreography/client/choreography.html" />
  <!--[if lt IE 9]>
    <script src="../../../../_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
        <script src="../../../../_static/jquery.js"></script>
        <script src="../../../../_static/_sphinx_javascript_frameworks_compat.js"></script>
        <script data-url_root="../../../../" id="documentation_options" src="../../../../_static/documentation_options.js"></script>
        <script src="../../../../_static/doctools.js"></script>
        <script src="../../../../_static/sphinx_highlight.js"></script>
    <script src="../../../../_static/js/theme.js"></script>
    <link rel="index" title="Index" href="../../../../genindex.html" />
    <link rel="search" title="Search" href="../../../../search.html" /> 
</head>

<body class="wy-body-for-nav"> 
  <div class="wy-grid-for-nav">
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >

          
          
          <a href="../../../../README.html">
            
              <img src="../../../../_static/bd-official-white.png" class="logo" alt="Logo"/>
          </a>
              <div class="version">
                5.0.1.1
              </div>
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
        </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../../../../docs/concepts/README.html">Concepts</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/about_spot.html">About Spot</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/orbit/about_orbit.html">About Orbit (formerly Scout)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/orbit/orbit_api.html">Orbit API</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/networking.html">Networking</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/base_services.html">Base services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/geometry_and_frames.html">Geometry and Frames</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/robot_services.html">Robot services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/estop_service.html">E-Stop</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/keepalive_service.html">KeepAlive (BETA)</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/audio_visual.html">Audio Visual</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/lease_service.html">Lease</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/developing_api_services.html">Developing API Services</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/service_customization.html">Service Customization</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/faults.html">Faults</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/autonomy/README.html">Autonomy services</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/graphnav_tech_summary.html">Autonomy Technical Summary</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/autonomous_navigation_code_examples.html">Autonomous navigation code examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/components_of_autonomous_navigation.html">Components of autonomous navigation</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/docking.html">Docking</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/typical_autonomous_navigation_use_case.html">Typical autonomous navigation use case</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/autonomous_navigation_services.html">Autonomous navigation services</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/graphnav_service.html">GraphNav service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/graphnav_map_structure.html">GraphNav map structure</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/graphnav_area_callbacks.html">GraphNav area callbacks</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/initialization.html">Initialization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/localization.html">Localization</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/graphnav_and_robot_locomotion.html">GraphNav and robot locomotion</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/missions_service.html">Missions service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/autowalk_service.html">Autowalk service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/network_compute_bridge.html">Network compute bridge</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/auto_return.html">AutoReturn service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/directed_exploration.html">Directed Exploration</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/autonomy/gps.html">GPS</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/choreography/README.html">Choreography</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/choreography_service.html">Choreography Service</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/move_reference.html">Move Reference Guide</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/custom_gait.html">CustomGait Reference</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/choreographer_setup.html">Choreographer Setup</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/choreographer.html">Choreographer Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/robot_controls_in_choreographer.html">Robot Connections in Choreographer</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/animations_in_choreographer.html">Animations in Choreography</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/animation_file_specification.html">Animation File Format</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/choreography_in_tablet.html">Tablet Choreography Mode</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/choreography/choreography_in_autowalk.html">Choreography Actions in Autowalk</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/joint_control/README.html">Joint Control API</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/joint_control/supplemental_data.html">Supplemental Robot Information</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../docs/concepts/joint_control/knee_torque_limits.html">Knee Torque Limits</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/arm/README.html">Spot Arm</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/arm/arm_specification.html">Arm and Gripper Specification</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/arm/arm_concepts.html">Concepts</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/arm/arm_services.html">Services</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/concepts/data.html">Spot Data</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/data_acquisition_overview.html">Data Acquisition Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/data_acquisition_output.html">Data Acquisition Output</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/writing_services_for_data_acquisition.html">Integrate Payloads with the API</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/data_buffer_overview.html">Data Buffer Overview</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/bddf.html">BDDF File Format</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/concepts/data_acquisition_thermal_raw.html">Thermal Raw Data Format</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../../docs/python/README.html">Python</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/python/quickstart.html">Quickstart</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/python/understanding_spot_programming.html">Understanding Spot Programming</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../python/examples/README.html">Examples</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/basic_service_examples.html">Basic Service Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/hello_spot/README.html">Hello Spot</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/directory/README.html">Directory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_robot_state/README.html">Get Robot State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_robot_state_async/README.html">Get Robot State Async</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_image/README.html">Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_world_objects/README.html">Get World Objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_mission_state/README.html">Get Mission State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/estop/README.html">E-Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/time_sync/README.html">Time Sync</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/comms_test/README.html">Comms Test</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/disable_ir_emission/README.html">IR Enable/Disable</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/reset_safety_stop/README.html">Reset Safety Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/audio_visual/audio_visual_params/README.html">Audio Visual Params</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/audio_visual/audio_visual_behaviors/README.html">Audio Visual Behaviors</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/robot_behavior_examples.html">Robot Behavior and Commands Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/stance/README.html">Stance</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/frame_trajectory_command/README.html">Frame Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/spot_light/README.html">Spot Light</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/upload_choreographed_sequence/README.html">Upload Choreographed Sequence</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/xbox_controller/README.html">Xbox Controller</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/wasd/README.html">WASD</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/docking/README.html">Docking</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/animation_recorder/README.html">Animation Recorder</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/auto_return/README.html">Auto Return</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/fan_command/README.html">Fan Commands</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_wasd/README.html">ARM WASD</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/arm_examples.html">Arm Command Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_simple/README.html">Simple Arm Motion</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_stow_unstow/README.html">Stow/unstow Arm</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_freeze/README.html">Arm Freeze</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_and_mobility_command/README.html">Arm and Mobility Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_with_body_follow/README.html">Arm Command with Body Following</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_constrained_manipulation/README.html">Arm Constrained Manipulation</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_trajectory/README.html">Arm Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_trajectory/README.html#long-trajectory">Long Trajectory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_joint_move/README.html">Arm Joint Move Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_force_control/README.html">Arm Force Control Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_grasp/README.html">Arm Grasp Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_grasp_carry_overrides/README.html">Arm Grasp and Carry Overrides</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_gaze/README.html">Arm Gaze Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_surface_contact/README.html">Arm Command with Surface Contact</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_door/README.html">Arm Door Opening Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_walk_to_object/README.html">Walk to And Pick Up Object</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_gcode/README.html">Writing Gcode</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/gripper_camera_params/README.html">Gripper Camera Parameters</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_impedance_control/README.html">Arm Impedance Control</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/inverse_kinematics/README.html">Inverse Kinematics</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/arm_wasd/README.html">Arm WASD</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/joint_control/README.html">Wiggle Arm</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/payloads_examples.html">Payloads and Registration Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/payloads/README.html">Payloads</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/self_registration/README.html">Self Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_faults/README.html">Faults</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/velodyne_client/README.html">Velodyne</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/core_io_gpio/README.html">CORE I/O GPIO</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/metrics_over_coreio/README.html">Overview</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/metrics_over_coreio/README.html#usage">Usage</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/metrics_over_coreio/README.html#components">Components</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/metrics_over_coreio/README.html#recommended-debugging">Recommended debugging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/extensions/README.html">Extensions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/perception_world_objects_examples.html">Perception and World Objects Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_image/README.html">Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_world_objects/README.html">Get World Objects</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/world_object_with_image_coordinates/README.html">World Object With Image Coordinates</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/world_object_mutations/README.html">World Object Mutations</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/visualizer/README.html">Visualizer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/gripper_camera_params/README.html">Gripper Camera Parameters</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/spot_cam/README.html">Spot CAM Services</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/spot_cam/README.html#spot-cam-video-core-io-extension-example">Spot Cam Video Core IO Extension Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/stitch_front_images/README.html">Stitch Front Images</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_depth_plus_visual_image/README.html">Project Depth Data on Visual Images</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_customization/custom_parameter_image_server/README.html">Custom Parameter Image Server</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/fiducial_follow/README.html">Fiducial Follow</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/spot_tensorflow_detector/README.html">Tensorflow Detector</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_customization/custom_parameter_ncb_worker/README.html">Custom Parameter Tensorflow Detector</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/network_compute_bridge/README.html">Machine Learning with the Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/network_compute_bridge/fire_extinguisher_server/README.html">Fire Extinguisher Detector with the Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/ray_cast/README.html">Ray Cast</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/user_nogo_regions/README.html">No-Go Regions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/gps_service/README.html">GPS</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/logging_examples.html">Logging Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/bddf_download/README.html">BDDF Download</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/data_buffer/README.html">Data Buffer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/data_service/README.html">Data Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/logging/README.html">Logging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/log_status/README.html">Log Status</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/data_acquisition_examples.html">Data Acquisition Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/data_acquisition_service/README.html">Data Acquisition Service</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/examples/data_acquisition_service/signals_coreio_modem_plugin/README.html">Modem Signals</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_faults/README.html">Faults</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_customization/custom_parameter_image_server/README.html">Custom Parameter Image Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/service_customization/custom_parameters_data_acquisition/README.html">Custom Parameter Data Acquisition Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_image/README.html">Test Image Service Implementation with Get Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/post_docking_callbacks/README.html">Post Docking Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/cloud_upload/README.html">Cloud Upload</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/comms_mapping/README.html">Comms image service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/comms_mapping/README.html#how-to-use">How to use</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/data_acquisition_service/signals_coreio_modem_plugin/README.html">CoreIO Modem Signals Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/tester_programs/README.html">Tester Programs</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/autonomy_and_missions_examples.html">Autonomy and Missions Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_anchoring_optimization/README.html">Graph Nav Anchoring Optimization</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_command_line/README.html">GraphNav and Recording Service Command Line Interfaces</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_command_line/README.html#example-programs">Example Programs</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_extract_point_cloud/README.html">Graph Nav Extract Point Cloud</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_view_map/README.html">Graph Nav View Map</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/graph_nav_view_gps/README.html">Graph Nav View GPS Data</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/get_mission_state/README.html">Get Mission State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/remote_mission_service/README.html">Remote Mission Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/mission_question_answerer/README.html">Mission Question Answerer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/mission_recorder/README.html">Mission Recorder</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/replay_mission/README.html">Replay Mission</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/post_docking_callbacks/README.html">Post Docking Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/area_callback/README.html">Area Callbacks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/edit_autowalk/README.html">Edit Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/record_autowalk/README.html">Record Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/extract_images_from_walk/README.html">Extract Images from Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/network_request_callback/README.html">Network Request Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/network_request_callback/README.html#id1">Network Request Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/remote_mission_service/spot_check/README.html">SpotCheck Mission Service</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/joint_control_examples.html">Joint Control API Examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/examples/docs/orbit.html">Orbit</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/hello_orbit/README.html">Hello Orbit</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/export_run_archives/README.html">Export Run Archives</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/export_site_walk_archives/README.html">Export Sitewalk Archives</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/anomalies/README.html">Anomalies</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/schedule_mission/README.html">Schedule Mission</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/runs_response/README.html">Runs Response</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/send_robot_back_to_dock/README.html">Return to Dock</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/toggle_mission_based_on_weather/README.html">Mission Toggle</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/webhook/README.html">Webhook</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/backups/README.html">Backups</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/webhook_integration/README.html">Webhook Integrations</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/examples/orbit/webhook_integration/README.html#example-overview">Example Overview</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../python/README.html">Python Reference Guide</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/README.html">Client</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/area_callback.html">Area Callback</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/area_callback_region_handler_base.html">Area Callback Region Handler</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_runner.html">Area Callback Service Runner</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_servicer.html">Area Callback Servicer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/area_callback_service_utils.html">Area Callback Service Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/arm_surface_contact.html">Arm Surface Contact</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/async_tasks.html">Async Tasks</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/audio_visual.html">Audio Visual</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/audio_visual_helpers.html">Audio Visual Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/auth.html">Auth</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/auto_return.html">Auto Return</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/autowalk.html">Autowalk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/bddf.html">BDDF</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/bddf_download.html">BDDF Download</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/channel.html">Channel</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/command_line.html">Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/common.html">Common</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_acquisition.html">Data Acquisition</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_helpers.html">Data Acquisition Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_plugin.html">Data Acquisition Plugin</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_plugin_service.html">Data Acquisition Plugin Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_acquisition_store.html">Data Acquisition Store</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_buffer.html">Data Buffer</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_chunk.html">Data Chunk</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/data_service.html">Data Service</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/directory_registration.html">Directory Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/directory.html">Directory</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/docking.html">Docking</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/door.html">Door</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/estop.html">E-Stop</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/error_callback_result.html">Error Callback Result</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/exceptions.html">Exceptions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/fault.html">Fault</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/frame_helpers.html">Frame Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/graph_nav.html">Graph Nav</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gripper_camera_param.html">Gripper Camera Params</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/README.html">GPS</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/aggregator_client.html">Aggregator Client</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/gps_listener.html">GPS Listener</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/NMEAParser.html">NMEA Parser</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/ntrip_client.html">NTRIP Client</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/gps/registration_client.html">Registration Client</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/image.html">Image</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/image_service_helpers.html">Image Service Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/inverse_kinematics.html">Inverse Kinematics</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/ir_enable_disable.html">IR Enable/Disable</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/keepalive.html">Keep Alive</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/lease.html">Lease</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/lease_resource_hierarchy.html">Lease Resource Hierarchy</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/lease_validator.html">Lease Validator</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/license.html">License</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/local_grid.html">Local Grid</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/log_status.html">Log Status</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/math_helpers.html">Math Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/manipulation_api_client.html">Manipulation API</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/map_processing.html">Map Processing</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/metrics_logging.html">Metrics Logging</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/network_compute_bridge_client.html">Network Compute Bridge</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/payload_registration.html">Payload Registration</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/payload_software_update.html">Payload Software Update</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/payload_software_update_initiation.html">Payload Software Update Initiation</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/payload.html">Payload</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/point_cloud.html">Point Cloud</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/power.html">Power</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/processors.html">Processors</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/ray_cast.html">Ray casting</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/recording.html">Recording</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/robot_command.html">Robot Command</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/robot_id.html">Robot ID</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/robot.html">Robot</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/robot_state.html">Robot State</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/sdk.html">SDK</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/server_util.html">Server Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/service_customization_helpers.html">Service Customization Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/signals_helpers.html">Signals Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/README.html">Spot CAM</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/audio.html">Audio</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/compositor.html">Compositor</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/health.html">Health</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/lighting.html">Lighting</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/lights_helper.html">Lights Helper</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/media_log.html">Media Log</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/network.html">Network</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/power.html">Power</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/ptz.html">PTZ</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/streamquality.html">Stream Quality</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_cam/version.html">Version</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/spot_check.html">Spot Check</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/time_sync.html">Time Sync</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/token_cache.html">Token Cache</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/token_manager.html">Token Manager</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/units_helpers.html">Units Helpers</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/util.html">Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-client/src/bosdyn/client/world_object.html">World Object</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/README.html">Core</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/README.html">BDDF</a><ul>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/base_data_reader.html">Base Data Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/block_writer.html">Block Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/bosdyn.html">BDDF Conventions</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/common.html">Common</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/data_reader.html">Data Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/data_writer.html">Data Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/file_indexer.html">File Indexer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/grpc_proto_reader.html">GRPC Proto Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/grpc_reader.html">GRPC Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/grpc_service_reader.html">GRPC Service Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/grpc_service_writer.html">GRPC Service Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/message_reader.html">Message Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/pod_series_reader.html">POD Series Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/pod_series_writer.html">POD Series Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_channel_reader.html">Protobuf Channel Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_reader.html">Protobuf Reader</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/protobuf_series_writer.html">Protobuf Series Writer</a></li>
<li class="toctree-l5"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/bddf/stream_data_reader.html">Stream Data Reader</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/geometry.html">Geometry</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/util.html">Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-core/src/bosdyn/deprecated.html">Deprecated</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/README.html">Mission</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/constants.html">Constants</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/exceptions.html">Exceptions</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/remote_client.html">Remote Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/server_util.html">Server Util</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-mission/src/bosdyn/mission/util.html">Util</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/README.html">Choreography</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html">Choreography</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/animation_file_to_proto.html">Animation File to Proto</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/animation_file_conversion_helpers.html">Animation File to Proto Helpers</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-orbit/src/bosdyn/orbit/README.html">Orbit (formerly Scout)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-orbit/src/bosdyn/orbit/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-orbit/src/bosdyn/orbit/utils.html">Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-orbit/src/bosdyn/orbit/exceptions.html">Exceptions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="../../../../python/bosdyn-scout/src/bosdyn/scout/README.html">Scout (deprecated)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-scout/src/bosdyn/scout/client.html">Client</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-scout/src/bosdyn/scout/utils.html">Utils</a></li>
<li class="toctree-l4"><a class="reference internal" href="../../../../python/bosdyn-scout/src/bosdyn/scout/exceptions.html">Exceptions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch1.html">Fetch Tutorial</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch2.html">Part 2: Training the Model</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch3.html">Part 3: Evaluating the Model</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch4.html">Part 4: Autonomous Pick Up</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch5.html">Part 5: Detecting People and Playing Fetch</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/fetch_tutorial/fetch6.html">Part 6: Running the model on Core IO</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq1.html">Data Collection Tutorial</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq2.html">Part 2: Capturing images</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq3.html">Part 3: Capturing other data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq4.html">Part 4: Deploying to the CORE I/O</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq5.html">Part 5: Collecting data</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/python/daq_tutorial/daq6.html">Part 6: Processing collected data</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../../docs/payload/README.html">Payloads</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/payload_configuration_requirements.html">Payload configuration requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/mechanical_interfaces.html">Mechanical interfaces</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/robot_mounting_rails.html">Robot mounting rails</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/guidelines_for_robust_payload_design.html">Guidelines for robust payload design</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/robot_electrical_interface.html">Robot electrical interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/coreio_documentation.html">CORE I/O Documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/coreio_openvpn_extension.html">CORE I/O OpenVPN Extension</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/configuring_payload_software.html">Configuring payload software</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/docker_containers.html">Dockerize payload software</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/payload/spot_core_documentation.html">Pre-3.2 Spot CORE Documentation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/payload/spot_core_portainer.html">Configuring Docker containers in SpotCORE</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/payload/spot_core_cockpit.html">Spot CORE system management tool: Cockpit</a></li>
<li class="toctree-l3"><a class="reference internal" href="../../../../docs/payload/spot_core_vnc.html">Spot CORE VNC</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../../docs/protos/README.html">API Protocol</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../../../docs/protos/style_guide.html">Style Guide</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../../../protos/bosdyn/api/README.html">Proto Reference Guide</a><ul>
<li class="toctree-l3"><a class="reference internal" href="../../../../protos/bosdyn/api/proto_reference.html">Protos</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../../../docs/release_notes.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/boston-dynamics/spot-sdk">SDK Repository</a></li>
</ul>

        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../../../../README.html">Spot</a>
      </nav>

      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="Page navigation">
  <ul class="wy-breadcrumbs">
      <li><a href="../../../../README.html" class="icon icon-home" aria-label="Home"></a></li>
          <li class="breadcrumb-item"><a href="../../../index.html">Module code</a></li>
      <li class="breadcrumb-item active">bosdyn.choreography.client.choreography</li>
      <li class="wy-breadcrumbs-aside">
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
             
  <h1>Source code for bosdyn.choreography.client.choreography</h1><div class="highlight"><pre>
<span></span><span class="c1"># Copyright (c) 2023 Boston Dynamics, Inc.  All rights reserved.</span>
<span class="c1">#</span>
<span class="c1"># Downloading, reproducing, distributing or otherwise using the SDK Software</span>
<span class="c1"># is subject to the terms and conditions of the Boston Dynamics Software</span>
<span class="c1"># Development Kit License (20191101-BDSDK-SL).</span>

<span class="sd">&quot;&quot;&quot;For clients to use the choreography service&quot;&quot;&quot;</span>
<span class="kn">import</span> <span class="nn">collections</span>
<span class="kn">import</span> <span class="nn">hashlib</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">os</span>

<span class="kn">from</span> <span class="nn">google.protobuf</span> <span class="kn">import</span> <span class="n">text_format</span>
<span class="kn">from</span> <span class="nn">google.protobuf.wrappers_pb2</span> <span class="kn">import</span> <span class="n">StringValue</span>

<span class="kn">from</span> <span class="nn">bosdyn.api.spot</span> <span class="kn">import</span> <span class="p">(</span><span class="n">choreography_sequence_pb2</span><span class="p">,</span> <span class="n">choreography_service_pb2</span><span class="p">,</span>
                             <span class="n">choreography_service_pb2_grpc</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.common</span> <span class="kn">import</span> <span class="p">(</span><span class="n">BaseClient</span><span class="p">,</span> <span class="n">common_header_errors</span><span class="p">,</span> <span class="n">common_lease_errors</span><span class="p">,</span>
                                  <span class="n">error_factory</span><span class="p">,</span> <span class="n">error_pair</span><span class="p">,</span> <span class="n">handle_common_header_errors</span><span class="p">,</span>
                                  <span class="n">handle_lease_use_result_errors</span><span class="p">,</span> <span class="n">handle_unset_status_error</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.exceptions</span> <span class="kn">import</span> <span class="n">ResponseError</span><span class="p">,</span> <span class="n">UnsetStatusError</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.lease</span> <span class="kn">import</span> <span class="n">add_lease_wallet_processors</span>
<span class="kn">from</span> <span class="nn">bosdyn.client.robot_command</span> <span class="kn">import</span> <span class="n">NoTimeSyncError</span><span class="p">,</span> <span class="n">_TimeConverter</span>
<span class="kn">from</span> <span class="nn">bosdyn.util</span> <span class="kn">import</span> <span class="n">seconds_to_duration</span>

<span class="n">LOGGER</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s1">&#39;__name__&#39;</span><span class="p">)</span>


<div class="viewcode-block" id="ChoreographyClient"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient">[docs]</a><span class="k">class</span> <span class="nc">ChoreographyClient</span><span class="p">(</span><span class="n">BaseClient</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Client for Choreography Service.&quot;&quot;&quot;</span>
    <span class="n">default_service_name</span> <span class="o">=</span> <span class="s1">&#39;choreography&#39;</span>
    <span class="n">license_name</span> <span class="o">=</span> <span class="s1">&#39;choreography&#39;</span>
    <span class="n">service_type</span> <span class="o">=</span> <span class="s1">&#39;bosdyn.api.spot.ChoreographyService&#39;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">ChoreographyClient</span><span class="p">,</span>
              <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">choreography_service_pb2_grpc</span><span class="o">.</span><span class="n">ChoreographyServiceStub</span><span class="p">)</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span> <span class="o">=</span> <span class="kc">None</span>

<div class="viewcode-block" id="ChoreographyClient.update_from"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.update_from">[docs]</a>    <span class="k">def</span> <span class="nf">update_from</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="nb">super</span><span class="p">(</span><span class="n">ChoreographyClient</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">update_from</span><span class="p">(</span><span class="n">other</span><span class="p">)</span>
        <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">lease_wallet</span><span class="p">:</span>
            <span class="n">add_lease_wallet_processors</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">lease_wallet</span><span class="p">)</span>
        <span class="c1"># Grab a timesync endpoint if it is available.</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span> <span class="o">=</span> <span class="n">other</span><span class="o">.</span><span class="n">time_sync</span><span class="o">.</span><span class="n">endpoint</span>
        <span class="k">except</span> <span class="ne">AttributeError</span><span class="p">:</span>
            <span class="k">pass</span>  <span class="c1"># other doesn&#39;t have a time_sync accessor</span></div>

    <span class="nd">@property</span>
    <span class="k">def</span> <span class="nf">timesync_endpoint</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Accessor for timesync-endpoint that was grabbed via &#39;update_from()&#39;.&quot;&quot;&quot;</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">NoTimeSyncError</span><span class="p">(</span><span class="s2">&quot;[choreography service] No timesync endpoint set for the robot&quot;</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_timesync_endpoint</span>

<div class="viewcode-block" id="ChoreographyClient.list_all_moves"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.list_all_moves">[docs]</a>    <span class="k">def</span> <span class="nf">list_all_moves</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Get a list of the different choreography sequence moves and associated parameters.&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ListAllMovesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ListAllMoves</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.list_all_moves_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.list_all_moves_async">[docs]</a>    <span class="k">def</span> <span class="nf">list_all_moves_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">object_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">time_start_point</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of list_all_moves().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ListAllMovesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ListAllMoves</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.list_all_sequences"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.list_all_sequences">[docs]</a>    <span class="k">def</span> <span class="nf">list_all_sequences</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Get a list of all sequences currently known about by the robot.&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ListAllSequencesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ListAllSequences</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.list_all_sequences_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.list_all_sequences_async">[docs]</a>    <span class="k">def</span> <span class="nf">list_all_sequences_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of list_all_sequences().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ListAllSequencesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ListAllSequences</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.upload_choreography"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.upload_choreography">[docs]</a>    <span class="k">def</span> <span class="nf">upload_choreography</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">choreography_seq</span><span class="p">,</span> <span class="n">non_strict_parsing</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Upload the choreography sequence to the robot.</span>

<span class="sd">        Args:</span>
<span class="sd">            choreography_seq (choreography_sequence_pb2.ChoreographySequence proto): The</span>
<span class="sd">                dance sequence to be sent and stored on the robot.</span>
<span class="sd">            non_strict_parsing (boolean): If true, the robot will fix any correctable errors within</span>
<span class="sd">                the choreography and allow users to run the dance. If false, if there are errors</span>
<span class="sd">                the robot will reject the choreography when attempting to run the dance.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The UploadChoreographyResponse message, which includes any warnings generated from the</span>
<span class="sd">            validation process for the choreography. If non_strict_parsing=False and there are warnings,</span>
<span class="sd">            then the dance will not be able to run.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadChoreographyRequest</span><span class="p">(</span>
            <span class="n">choreography_sequence</span><span class="o">=</span><span class="n">choreography_seq</span><span class="p">,</span> <span class="n">non_strict_parsing</span><span class="o">=</span><span class="n">non_strict_parsing</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadChoreography</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.upload_choreography_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.upload_choreography_async">[docs]</a>    <span class="k">def</span> <span class="nf">upload_choreography_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">choreography_seq</span><span class="p">,</span> <span class="n">non_strict_parsing</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of upload_choreography().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadChoreographyRequest</span><span class="p">(</span>
            <span class="n">choreography_sequence</span><span class="o">=</span><span class="n">choreography_seq</span><span class="p">,</span> <span class="n">non_strict_parsing</span><span class="o">=</span><span class="n">non_strict_parsing</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadChoreography</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.upload_animated_move"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.upload_animated_move">[docs]</a>    <span class="k">def</span> <span class="nf">upload_animated_move</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">animation</span><span class="p">,</span> <span class="n">generated_id</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Upload the animation proto to the robot to be used as a move in choreography sequences.</span>

<span class="sd">        Args:</span>
<span class="sd">            animation (choreography_sequence_pb2.Animation): The animated move protobuf message. This</span>
<span class="sd">                can be generated by converting a `cha` file using the animation_file_to_proto helpers.</span>
<span class="sd">            generated_id (string): The ID hash generated for the animation based on the serialization</span>
<span class="sd">                of the protobuf message. This can be left empty, and the robot will re-parse and</span>
<span class="sd">                validate the message. This will be filled out automatically when using</span>
<span class="sd">                the AnimationUploadHelper.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The UploadAnimatedMoveResponse message, which includes warnings if the uploaded animation</span>
<span class="sd">            was invalid.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">gen_id_proto</span> <span class="o">=</span> <span class="n">StringValue</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="n">generated_id</span><span class="p">)</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveRequest</span><span class="p">(</span>
            <span class="n">animated_move</span><span class="o">=</span><span class="n">animation</span><span class="p">,</span> <span class="n">animated_move_generated_id</span><span class="o">=</span><span class="n">gen_id_proto</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadAnimatedMove</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_animated_move_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.upload_animated_move_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.upload_animated_move_async">[docs]</a>    <span class="k">def</span> <span class="nf">upload_animated_move_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">animation</span><span class="p">,</span> <span class="n">generated_id</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of upload_animated_move().&quot;&quot;&quot;</span>
        <span class="n">gen_id_proto</span> <span class="o">=</span> <span class="n">StringValue</span><span class="p">(</span><span class="n">value</span><span class="o">=</span><span class="n">generated_id</span><span class="p">)</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveRequest</span><span class="p">(</span>
            <span class="n">animated_move</span><span class="o">=</span><span class="n">animation</span><span class="p">,</span> <span class="n">animated_move_generated_id</span><span class="o">=</span><span class="n">gen_id_proto</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">UploadAnimatedMove</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_upload_animated_move_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_choreography_status"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_choreography_status">[docs]</a>    <span class="k">def</span> <span class="nf">get_choreography_status</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Get the dance related status information for a robot and the local time for which it was valid.&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographyStatusRequest</span><span class="p">()</span>
        <span class="n">status</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyStatus</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                           <span class="n">error_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
        <span class="n">client_time</span> <span class="o">=</span> <span class="n">_TimeConverter</span><span class="p">(</span>
            <span class="bp">self</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">timesync_endpoint</span><span class="p">)</span><span class="o">.</span><span class="n">local_seconds_from_robot_timestamp</span><span class="p">(</span><span class="n">status</span><span class="o">.</span><span class="n">validity_time</span><span class="p">)</span>
        <span class="k">return</span> <span class="p">(</span><span class="n">status</span><span class="p">,</span> <span class="n">client_time</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_choreography_status_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_choreography_status_async">[docs]</a>    <span class="k">def</span> <span class="nf">get_choreography_status_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of get_choreography_status.&quot;&quot;&quot;</span>

        <span class="k">def</span> <span class="nf">_return_response_and_validity_time</span><span class="p">(</span><span class="n">result</span><span class="p">):</span>
            <span class="n">client_time</span> <span class="o">=</span> <span class="n">_TimeConverter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span>
                                         <span class="bp">self</span><span class="o">.</span><span class="n">timesync_endpoint</span><span class="p">)</span><span class="o">.</span><span class="n">local_seconds_from_robot_timestamp</span><span class="p">(</span>
                                             <span class="n">result</span><span class="o">.</span><span class="n">validity_time</span><span class="p">)</span>
            <span class="k">return</span> <span class="n">result</span><span class="p">,</span> <span class="n">client_time</span>

        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographyStatusRequest</span><span class="p">()</span>
        <span class="n">status</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyStatus</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span>
                                 <span class="n">value_from_response</span><span class="o">=</span><span class="n">_return_response_and_validity_time</span><span class="p">,</span>
                                 <span class="n">error_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">status</span></div>

<div class="viewcode-block" id="ChoreographyClient.choreography_log_to_animation_file"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.choreography_log_to_animation_file">[docs]</a>    <span class="k">def</span> <span class="nf">choreography_log_to_animation_file</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">fpath</span><span class="p">,</span> <span class="n">has_arm</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Turn the choreography log from the proto into an animation `cha` file type.</span>

<span class="sd">        Args:</span>
<span class="sd">            name (string): Name that the `cha` file will be saved as.</span>
<span class="sd">            fpath (string): Location where the new `cha` file will be saved.</span>
<span class="sd">            has_arm (boolean): True if the robot has an arm, False if the robot doesn&#39;t have an arm. When False arm motion won&#39;t</span>
<span class="sd">                    be added to the `cha` file.</span>
<span class="sd">            *args (string(s) or list): String(s), list of strings, or a mix of string(s) and list(s) that are the options to be</span>
<span class="sd">                    included in the `cha` file. (ex. &#39;truncatable&#39;)</span>

<span class="sd">        Returns:</span>
<span class="sd">            The filename of the new animation `cha` file for the most recent choreography log.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="k">def</span> <span class="nf">option_list</span><span class="p">(</span><span class="o">*</span><span class="n">argvs</span><span class="p">):</span>
<span class="w">            </span><span class="sd">&quot;&quot;&quot;Takes a list of options or a variable number of string arguments, or a mix of the two and returns a single list</span>
<span class="sd">                containing all of the options to be included</span>
<span class="sd">            &quot;&quot;&quot;</span>
            <span class="n">x</span> <span class="o">=</span> <span class="p">[]</span>
            <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">argvs</span><span class="p">:</span>
                <span class="k">if</span> <span class="s1">&#39;list&#39;</span> <span class="ow">in</span> <span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">i</span><span class="p">)):</span>
                    <span class="n">x</span> <span class="o">+=</span> <span class="nb">list</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
                <span class="k">elif</span> <span class="s1">&#39;str&#39;</span> <span class="ow">in</span> <span class="nb">str</span><span class="p">(</span><span class="nb">type</span><span class="p">(</span><span class="n">i</span><span class="p">)):</span>
                    <span class="n">x</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
            <span class="k">return</span> <span class="n">x</span>

        <span class="k">def</span> <span class="nf">list_to_formatted_string</span><span class="p">(</span><span class="n">alist</span><span class="p">,</span> <span class="n">space</span><span class="p">):</span>
<span class="w">            </span><span class="sd">&quot;&quot;&quot;Helper function for formatting the `cha` file columns.&quot;&quot;&quot;</span>
            <span class="n">format_str</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">space</span> <span class="k">for</span> <span class="n">_</span> <span class="ow">in</span> <span class="n">alist</span><span class="p">)</span>
            <span class="k">return</span> <span class="n">format_str</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="o">*</span><span class="n">alist</span><span class="p">)</span>

        <span class="k">def</span> <span class="nf">timestamp_to_seconds</span><span class="p">(</span><span class="n">timestamp</span><span class="p">):</span>
<span class="w">            </span><span class="sd">&quot;&quot;&quot;Helper function to turn a seconds quantity and nanoseconds quantity into one value of unit seconds.&quot;&quot;&quot;</span>
            <span class="k">return</span> <span class="n">timestamp</span><span class="o">.</span><span class="n">seconds</span> <span class="o">+</span> <span class="mf">1e-9</span> <span class="o">*</span> <span class="n">timestamp</span><span class="o">.</span><span class="n">nanos</span>

        <span class="c1">#get the choreography log for the recording</span>
        <span class="n">log_type</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">DownloadRobotStateLogRequest</span><span class="o">.</span><span class="n">LOG_TYPE_MANUAL</span>
        <span class="n">response_status</span><span class="p">,</span> <span class="n">choreography_log</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">download_robot_state_log</span><span class="p">(</span><span class="n">log_type</span><span class="p">)</span>

        <span class="c1">#create the header for the *.cha file</span>
        <span class="n">joint_type_list</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;leg_joints&quot;</span><span class="p">,</span> <span class="s2">&quot;body_pos&quot;</span><span class="p">,</span> <span class="s2">&quot;body_quat_xyzw&quot;</span><span class="p">,</span> <span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="s2">&quot;contact&quot;</span><span class="p">]</span>
        <span class="n">controls_header</span> <span class="o">=</span> <span class="s2">&quot;controls legs body&quot;</span>
        <span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;Animation created from log recording.&quot;</span>

        <span class="k">if</span> <span class="n">has_arm</span><span class="p">:</span>
            <span class="c1">#if the robot has an arm, add the gripper and arm to the header description and keywords section</span>
            <span class="n">joint_type_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;arm_joints&quot;</span><span class="p">)</span>
            <span class="n">joint_type_list</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s2">&quot;gripper&quot;</span><span class="p">)</span>
            <span class="n">controls_header</span> <span class="o">=</span> <span class="n">controls_header</span> <span class="o">+</span> <span class="s2">&quot; arm gripper&quot;</span>

        <span class="c1">#format the complete header with all the options to be included in the *.cha file</span>
        <span class="n">joint_spacer</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{:&lt;60}</span><span class="s2">&quot;</span>
        <span class="n">header</span> <span class="o">=</span> <span class="p">(</span><span class="n">controls_header</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
                  <span class="s2">&quot;description: &quot;</span> <span class="o">+</span> <span class="n">description</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>

        <span class="k">for</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">option_list</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">):</span>
            <span class="n">header</span> <span class="o">=</span> <span class="n">header</span> <span class="o">+</span> <span class="n">option</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>

        <span class="n">header</span> <span class="o">=</span> <span class="n">header</span> <span class="o">+</span> <span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span>
                           <span class="s2">&quot;no parameters</span><span class="se">\n\n</span><span class="s2">&quot;</span> <span class="o">+</span>
                           <span class="n">list_to_formatted_string</span><span class="p">(</span><span class="n">joint_type_list</span><span class="p">,</span> <span class="n">joint_spacer</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>

        <span class="n">spacer_val</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:&lt;30}</span><span class="s1">&#39;</span>
        <span class="n">ext</span> <span class="o">=</span> <span class="s2">&quot;.cha&quot;</span>
        <span class="n">file_path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">fpath</span><span class="p">,</span> <span class="n">name</span> <span class="o">+</span> <span class="n">ext</span><span class="p">)</span>
        <span class="n">initial_time</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span>

        <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="s1">&#39;w&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
            <span class="c1">#write the formatted header to the *.cha file</span>
            <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">header</span><span class="p">)</span>

            <span class="c1">#create an empty list to hold the values for the current keyframe</span>
            <span class="n">list_values</span> <span class="o">=</span> <span class="p">[]</span>

            <span class="c1"># get the list of all the keyframes from the recording,</span>
            <span class="c1"># (the complete description of the robot in space at each timestamp)</span>
            <span class="n">keyframe_list</span> <span class="o">=</span> <span class="n">choreography_log</span><span class="o">.</span><span class="n">key_frames</span>

            <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="n">keyframe_list</span><span class="p">:</span>
                <span class="c1"># for each animation keyframe in the protobuf log put the desired joint values and timestamp in a list</span>
                <span class="c1"># and then write them to the *.cha file. Values are added to list_values in the same order as the</span>
                <span class="c1"># joint categories in joint_type_list, and the order of the joint angles within those groups must also</span>
                <span class="c1"># go in the correct order for the *.cha to be read correctly.</span>
                <span class="n">list_values</span> <span class="o">=</span> <span class="p">[]</span>

                <span class="c1">#leg_joints values:</span>
                <span class="c1">#front right leg joint values</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fr</span><span class="o">.</span><span class="n">hip_x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fr</span><span class="o">.</span><span class="n">hip_y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fr</span><span class="o">.</span><span class="n">knee</span><span class="p">)</span>

                <span class="c1">#front left leg joint values</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fl</span><span class="o">.</span><span class="n">hip_x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fl</span><span class="o">.</span><span class="n">hip_y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">fl</span><span class="o">.</span><span class="n">knee</span><span class="p">)</span>

                <span class="c1">#hind right leg joint values</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hr</span><span class="o">.</span><span class="n">hip_x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hr</span><span class="o">.</span><span class="n">hip_y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hr</span><span class="o">.</span><span class="n">knee</span><span class="p">)</span>

                <span class="c1">#hind left leg joint values</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hl</span><span class="o">.</span><span class="n">hip_x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hl</span><span class="o">.</span><span class="n">hip_y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">hl</span><span class="o">.</span><span class="n">knee</span><span class="p">)</span>

                <span class="c1">#body_pos values:</span>
                <span class="c1">#position of the body in the animation frame</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">position</span><span class="o">.</span><span class="n">x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">position</span><span class="o">.</span><span class="n">y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">position</span><span class="o">.</span><span class="n">z</span><span class="p">)</span>

                <span class="c1">#body_quat_xyzw values:</span>
                <span class="c1">#rotation of the body in the animation frame</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">rotation</span><span class="o">.</span><span class="n">x</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">rotation</span><span class="o">.</span><span class="n">y</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">rotation</span><span class="o">.</span><span class="n">z</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">animation_tform_body</span><span class="o">.</span><span class="n">rotation</span><span class="o">.</span><span class="n">w</span><span class="p">)</span>

                <span class="c1">#time value:</span>
                <span class="c1">#time, in seconds, when the keyframe position occurs relative to the start of the recording</span>
                <span class="n">time</span> <span class="o">=</span> <span class="n">timestamp_to_seconds</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">timestamp</span><span class="p">)</span>

                <span class="c1">#if the initial time is negative it&#39;s the first timestamp recorded, set that as the initial time</span>
                <span class="k">if</span> <span class="p">(</span><span class="n">initial_time</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="p">):</span>
                    <span class="n">initial_time</span> <span class="o">=</span> <span class="n">time</span>

                <span class="c1">#adjust the timestamp so it&#39;s relative to the start of the recording</span>
                <span class="n">time</span> <span class="o">=</span> <span class="n">time</span> <span class="o">-</span> <span class="n">initial_time</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">time</span><span class="p">)</span>

                <span class="c1">#contact values:</span>
                <span class="c1">#contact state of each foot; 0 for airborne, 1 for contact with the floor.</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">foot_contact_state</span><span class="o">.</span><span class="n">fr_contact</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">foot_contact_state</span><span class="o">.</span><span class="n">fl_contact</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">foot_contact_state</span><span class="o">.</span><span class="n">hr_contact</span><span class="p">)</span>
                <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">foot_contact_state</span><span class="o">.</span><span class="n">hl_contact</span><span class="p">)</span>

                <span class="k">if</span> <span class="n">has_arm</span><span class="p">:</span>
                    <span class="c1">#if the robot has an arm, record the joint values of the arm and gripper</span>

                    <span class="c1">#arm_joints values:</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">shoulder_0</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">shoulder_1</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">elbow_0</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">elbow_1</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">wrist_0</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">arm</span><span class="o">.</span><span class="n">wrist_1</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>

                    <span class="c1">#gripper value:</span>
                    <span class="n">list_values</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">k</span><span class="o">.</span><span class="n">joint_angles</span><span class="o">.</span><span class="n">gripper_angle</span><span class="o">.</span><span class="n">value</span><span class="p">)</span>

                <span class="c1">#format the values of the keyframe and write them to the *.cha animation file</span>
                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">list_to_formatted_string</span><span class="p">(</span><span class="n">list_values</span><span class="p">,</span> <span class="n">spacer_val</span><span class="p">))</span>
                <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="p">)</span>

        <span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Animation *.cha file downloaded to: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">name</span> <span class="o">+</span> <span class="s2">&quot;.cha&quot;</span></div>

<div class="viewcode-block" id="ChoreographyClient.choreography_time_adjust"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.choreography_time_adjust">[docs]</a>    <span class="k">def</span> <span class="nf">choreography_time_adjust</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">override_client_start_time</span><span class="p">,</span> <span class="n">time_difference</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                 <span class="n">validity_time</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Provide a time to execute the choreography sequence instead the value passed in by</span>
<span class="sd">        execute_choreography. Useful for when multiple robots are performing a synced</span>
<span class="sd">        performance, and all robots should begin dancing at the same time.</span>

<span class="sd">        Args:</span>
<span class="sd">            override_client_start_time (float): The time (in seconds) that the dance should start. This time</span>
<span class="sd">                should be provided in the local clock&#39;s timeframe and the client will convert it</span>
<span class="sd">                to the required robot&#39;s clock timeframe.</span>
<span class="sd">            time_difference (float): The acceptable time difference in seconds between an ExecuteChoreographyRequest start</span>
<span class="sd">                time and the override time where the override_client_start_time will be used instead of the start time</span>
<span class="sd">                specified by the ExecuteChoreographyRequest. If not set will default to 20s. Maximum time_difference is</span>
<span class="sd">                2 minutes.</span>
<span class="sd">            validity_time (float): How far in the future, in seconds from the current time, can the</span>
<span class="sd">                override_client_start_time be. If not set will default to 60s. Maximum validity_time is</span>
<span class="sd">                5 minutes.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_choreography_time_adjust_request</span><span class="p">(</span><span class="n">override_client_start_time</span><span class="p">,</span>
                                                          <span class="n">time_difference</span><span class="p">,</span> <span class="n">validity_time</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyTimeAdjust</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.choreography_time_adjust_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.choreography_time_adjust_async">[docs]</a>    <span class="k">def</span> <span class="nf">choreography_time_adjust_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">override_client_start_time</span><span class="p">,</span> <span class="n">time_difference</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                       <span class="n">validity_time</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of choreography_time_adjust()&quot;&quot;&quot;</span>

        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_choreography_time_adjust_request</span><span class="p">(</span><span class="n">override_client_start_time</span><span class="p">,</span>
                                                          <span class="n">time_difference</span><span class="p">,</span> <span class="n">validity_time</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyTimeAdjust</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.execute_choreography"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.execute_choreography">[docs]</a>    <span class="k">def</span> <span class="nf">execute_choreography</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">choreography_name</span><span class="p">,</span> <span class="n">client_start_time</span><span class="p">,</span>
                             <span class="n">choreography_starting_slice</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Execute the current choreography sequence loaded on the robot by name.</span>

<span class="sd">        Args:</span>
<span class="sd">            choreography_name (string): The name of the uploaded choreography to run. The robot</span>
<span class="sd">                only stores a single choreography at a time, so this name should match the last</span>
<span class="sd">                uploaded choreography.</span>
<span class="sd">            client_start_time (float): The time (in seconds) that the dance should start. This time</span>
<span class="sd">                should be provided in the local clock&#39;s timeframe and the client will convert it</span>
<span class="sd">                to the required robot&#39;s clock timeframe.</span>
<span class="sd">            choreography_starting_slice (int): Which slice to start the dance at when the start</span>
<span class="sd">                time is reached. By default, it will start with the first slice.</span>
<span class="sd">            lease (lease_pb2.Lease protobuf): A specific lease to use for the request. If nothing is</span>
<span class="sd">                provided, the client will append the next lease sequence in this field by default.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full ExecuteChoreographyResponse message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_execute_choreography_request</span><span class="p">(</span><span class="n">choreography_name</span><span class="p">,</span> <span class="n">client_start_time</span><span class="p">,</span>
                                                      <span class="n">choreography_starting_slice</span><span class="p">,</span> <span class="n">lease</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ExecuteChoreography</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_execute_choreography_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.execute_choreography_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.execute_choreography_async">[docs]</a>    <span class="k">def</span> <span class="nf">execute_choreography_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">choreography_name</span><span class="p">,</span> <span class="n">client_start_time</span><span class="p">,</span>
                                   <span class="n">choreography_starting_slice</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of execute_choreography().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_execute_choreography_request</span><span class="p">(</span><span class="n">choreography_name</span><span class="p">,</span> <span class="n">client_start_time</span><span class="p">,</span>
                                                      <span class="n">choreography_starting_slice</span><span class="p">,</span> <span class="n">lease</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ExecuteChoreography</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_execute_choreography_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.choreography_command"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.choreography_command">[docs]</a>    <span class="k">def</span> <span class="nf">choreography_command</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command_list</span><span class="p">,</span> <span class="n">client_end_time</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Sends commands to interact with individual choreography moves.</span>

<span class="sd">        Args:</span>
<span class="sd">            command_list(list of choreography_sequence_pb2.MoveCommand protobuf): The commands.  Each</span>
<span class="sd">                command interacts with a single individual move.</span>
<span class="sd">            client_end_time (float): The time (in seconds) that the command stops being valid. This time</span>
<span class="sd">                should be provided in the local clock&#39;s timeframe and the client will convert it</span>
<span class="sd">                to the required robot&#39;s clock timeframe.</span>
<span class="sd">            lease (lease_pb2.Lease protobuf): A specific lease to use for the request. If nothing is</span>
<span class="sd">                provided, the client will append the next lease sequence in this field by default.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full ChoreographyCommandResponse message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_choreography_command_request</span><span class="p">(</span><span class="n">command_list</span><span class="p">,</span> <span class="n">client_end_time</span><span class="p">,</span> <span class="n">lease</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyCommand</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.choreography_command_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.choreography_command_async">[docs]</a>    <span class="k">def</span> <span class="nf">choreography_command_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command_list</span><span class="p">,</span> <span class="n">client_end_time</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of choreography_command().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_choreography_command_request</span><span class="p">(</span><span class="n">command_list</span><span class="p">,</span> <span class="n">client_end_time</span><span class="p">,</span> <span class="n">lease</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ChoreographyCommand</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.leg_size_configuration"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.leg_size_configuration">[docs]</a>    <span class="k">def</span> <span class="nf">leg_size_configuration</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">front_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">front_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">hind_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">hind_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot; Tell the robot its legs are a non-standard size to help avoid self-collision. Typically used for robots that are wearing costumes.</span>
<span class="sd">            Configuration will be permanently stored (persisting through reboot) until cleared by sending an empty request.</span>
<span class="sd">        Args: </span>
<span class="sd">            front_left_size: New leg configuration dimensions for the front left leg. Either </span>
<span class="sd">                a LegSize message or a list of 4 floats. If None, all config values are set to zero.</span>
<span class="sd">            front_right_size: Same as front_left_size, but for the front right leg.</span>
<span class="sd">            hind_left_size: Same as front_left_size, but for the hind left leg.</span>
<span class="sd">            hind_right_size: Same as front_left_size, but for the hind right leg.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full LegSizeConfigurationResponse message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size_configuration_request</span><span class="p">(</span><span class="n">front_left_size</span><span class="o">=</span><span class="n">front_left_size</span><span class="p">,</span>
                                                        <span class="n">front_right_size</span><span class="o">=</span><span class="n">front_right_size</span><span class="p">,</span>
                                                        <span class="n">hind_left_size</span><span class="o">=</span><span class="n">hind_left_size</span><span class="p">,</span>
                                                        <span class="n">hind_right_size</span><span class="o">=</span><span class="n">hind_right_size</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">LegSizeConfiguration</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.leg_size_configuration_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.leg_size_configuration_async">[docs]</a>    <span class="k">def</span> <span class="nf">leg_size_configuration_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">front_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">front_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                     <span class="n">hind_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">hind_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of leg_size_configuration()&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size_configuration_request</span><span class="p">(</span><span class="n">front_left_size</span><span class="o">=</span><span class="n">front_left_size</span><span class="p">,</span>
                                                        <span class="n">front_right_size</span><span class="o">=</span><span class="n">front_right_size</span><span class="p">,</span>
                                                        <span class="n">hind_left_size</span><span class="o">=</span><span class="n">hind_left_size</span><span class="p">,</span>
                                                        <span class="n">hind_right_size</span><span class="o">=</span><span class="n">hind_right_size</span><span class="p">)</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">LegSizeConfiguration</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.leg_size_configuration_state"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.leg_size_configuration_state">[docs]</a>    <span class="k">def</span> <span class="nf">leg_size_configuration_state</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot; Read the current leg size configuration from the robot. On a robot with the default leg size configuration the </span>
<span class="sd">        values for each leg&#39;s LegSize will be:</span>

<span class="sd">            distance_inward = 0.02 m</span>
<span class="sd">            distance_outward = 0.02 m</span>
<span class="sd">            distance_forward = 0.035 m                                          </span>
<span class="sd">            distance_backward = 0.035 m</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full LegSizeConfigurationStateResponse message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSizeConfigurationStateRequest</span><span class="p">()</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">LegSizeConfigurationState</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.leg_size_configuration_state_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.leg_size_configuration_state_async">[docs]</a>    <span class="k">def</span> <span class="nf">leg_size_configuration_state_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of leg_size_configuration_state()&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSizeConfigurationStateRequest</span><span class="p">()</span>

        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">LegSizeConfigurationState</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.start_recording_state"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.start_recording_state">[docs]</a>    <span class="k">def</span> <span class="nf">start_recording_state</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">duration_secs</span><span class="p">,</span> <span class="n">continue_session_id</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Start (or continue) a manually recorded robot state log.</span>

<span class="sd">        Args:</span>
<span class="sd">            duration_secs (float): The duration of the recording request in seconds. This will</span>
<span class="sd">                apply from when the StartRecording rpc is received.</span>
<span class="sd">            continue_session_id (int): If provided, the RPC will continue the recording</span>
<span class="sd">                session associated with that ID.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full StartRecordingStateResponse proto.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_start_recording_state_request</span><span class="p">(</span><span class="n">duration_secs</span><span class="p">,</span> <span class="n">continue_session_id</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">StartRecordingState</span><span class="p">,</span>
            <span class="n">request</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_start_recording_state_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.start_recording_state_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.start_recording_state_async">[docs]</a>    <span class="k">def</span> <span class="nf">start_recording_state_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">duration_secs</span><span class="p">,</span> <span class="n">continue_session_id</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of start_recording_state().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_start_recording_state_request</span><span class="p">(</span><span class="n">duration_secs</span><span class="p">,</span> <span class="n">continue_session_id</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">StartRecordingState</span><span class="p">,</span>
            <span class="n">request</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_start_recording_state_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.stop_recording_state"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.stop_recording_state">[docs]</a>    <span class="k">def</span> <span class="nf">stop_recording_state</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Stop recording a manual choreography log.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full StopRecordingStateResponse proto.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StopRecordingStateRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">StopRecordingState</span><span class="p">,</span>
            <span class="n">request</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.stop_recording_state_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.stop_recording_state_async">[docs]</a>    <span class="k">def</span> <span class="nf">stop_recording_state_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of stop_recording_state().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StopRecordingStateRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">StopRecordingState</span><span class="p">,</span>
            <span class="n">request</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_choreography_sequence"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_choreography_sequence">[docs]</a>    <span class="k">def</span> <span class="nf">get_choreography_sequence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">return_animation_names_only</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Get a sequence currently known by the robot, response includes</span>
<span class="sd">            the full ChoreographySequence with the given name and any</span>
<span class="sd">            Animations used in the sequence.</span>

<span class="sd">            Args:</span>
<span class="sd">                seq_name (string): the name of the sequence to return.</span>
<span class="sd">                return_animation_names_only (bool): If True, skip returning a list of the complete </span>
<span class="sd">                    Animation protos required by the sequence and leave the &#39;animated_moves&#39; field of</span>
<span class="sd">                    the response empty. (The repeated string field, &#39;animation_names&#39; for the list </span>
<span class="sd">                    of the names of required animations will still be returned). </span>

<span class="sd">        Returns:</span>
<span class="sd">            The full GetChoreographySequenceResponse proto.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">GetChoreographySequenceRequest</span><span class="p">()</span>
        <span class="n">req</span><span class="o">.</span><span class="n">sequence_name</span> <span class="o">=</span> <span class="n">seq_name</span>
        <span class="n">req</span><span class="o">.</span><span class="n">return_animation_names_only</span> <span class="o">=</span> <span class="n">return_animation_names_only</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetChoreographySequence</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_choreography_sequence_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_choreography_sequence_async">[docs]</a>    <span class="k">def</span> <span class="nf">get_choreography_sequence_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">return_animation_names_only</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                                        <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of get_choreography_sequence().&quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">GetChoreographySequenceRequest</span><span class="p">()</span>
        <span class="n">req</span><span class="o">.</span><span class="n">sequence_name</span> <span class="o">=</span> <span class="n">seq_name</span>
        <span class="n">req</span><span class="o">.</span><span class="n">return_animation_names_only</span> <span class="o">=</span> <span class="n">return_animation_names_only</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetChoreographySequence</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_animation"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_animation">[docs]</a>    <span class="k">def</span> <span class="nf">get_animation</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Get an animation currently known by the robot, response includes</span>
<span class="sd">            the full Animation proto with the given name.</span>

<span class="sd">            Args:</span>
<span class="sd">                name (string): the name of the animation to return.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full GetAnimation proto.</span>
<span class="sd">        &quot;&quot;&quot;</span>

        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">GetAnimationRequest</span><span class="p">()</span>
        <span class="n">req</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetAnimation</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.get_animation_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.get_animation_async">[docs]</a>    <span class="k">def</span> <span class="nf">get_animation_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of get_animation().&quot;&quot;&quot;</span>

        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">GetAnimationRequest</span><span class="p">()</span>
        <span class="n">req</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">GetAnimation</span><span class="p">,</span>
            <span class="n">req</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>  <span class="c1"># Return the complete response message</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.save_sequence"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.save_sequence">[docs]</a>    <span class="k">def</span> <span class="nf">save_sequence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">labels</span><span class="o">=</span><span class="p">[],</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Save an uploaded sequence to the robot. Saved sequences are</span>
<span class="sd">        automatically uploaded to the robot when it boots.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full SaveSequenceResponse proto.&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_save_sequence_request</span><span class="p">(</span><span class="n">seq_name</span><span class="p">,</span> <span class="n">labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SaveSequence</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.save_sequence_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.save_sequence_async">[docs]</a>    <span class="k">def</span> <span class="nf">save_sequence_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">labels</span><span class="o">=</span><span class="p">[],</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of save_sequence().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_save_sequence_request</span><span class="p">(</span><span class="n">seq_name</span><span class="p">,</span> <span class="n">labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">SaveSequence</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.delete_sequence"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.delete_sequence">[docs]</a>    <span class="k">def</span> <span class="nf">delete_sequence</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Delete a sequence from temporary robot memory and</span>
<span class="sd">        delete any copies of the sequence saved to disk.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full DeleteSequenceResponse proto.&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">DeleteSequenceRequest</span><span class="p">(</span><span class="n">sequence_name</span><span class="o">=</span><span class="n">seq_name</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DeleteSequence</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.delete_sequence_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.delete_sequence_async">[docs]</a>    <span class="k">def</span> <span class="nf">delete_sequence_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of delete_sequence().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">DeleteSequenceRequest</span><span class="p">(</span><span class="n">sequence_name</span><span class="o">=</span><span class="n">seq_name</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DeleteSequence</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.modify_choreography_info"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.modify_choreography_info">[docs]</a>    <span class="k">def</span> <span class="nf">modify_choreography_info</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">add_labels</span><span class="o">=</span><span class="p">[],</span> <span class="n">remove_labels</span><span class="o">=</span><span class="p">[],</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Modifies a sequence&#39;s ChoreographyInfo field to remove or</span>
<span class="sd">        add any labels attached to the sequence.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full ModifyChoreographyInfoResponse proto.&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_modify_choreography_info_request</span><span class="p">(</span><span class="n">seq_name</span><span class="p">,</span> <span class="n">add_labels</span><span class="p">,</span> <span class="n">remove_labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ModifyChoreographyInfo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.modify_choreography_info_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.modify_choreography_info_async">[docs]</a>    <span class="k">def</span> <span class="nf">modify_choreography_info_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">seq_name</span><span class="p">,</span> <span class="n">add_labels</span><span class="o">=</span><span class="p">[],</span> <span class="n">remove_labels</span><span class="o">=</span><span class="p">[],</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of modify_choreography_info().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_modify_choreography_info_request</span><span class="p">(</span><span class="n">seq_name</span><span class="p">,</span> <span class="n">add_labels</span><span class="p">,</span> <span class="n">remove_labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ModifyChoreographyInfo</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.clear_all_sequence_files"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.clear_all_sequence_files">[docs]</a>    <span class="k">def</span> <span class="nf">clear_all_sequence_files</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Completely clears all choreography files that are saved on the robot,</span>
<span class="sd">        including animation proto files.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full ClearAllSequenceFilesResponse proto.&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ClearAllSequenceFilesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ClearAllSequenceFiles</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                         <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.clear_all_sequence_files_async"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.clear_all_sequence_files_async">[docs]</a>    <span class="k">def</span> <span class="nf">clear_all_sequence_files_async</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Async version of clear_all_sequence_files().&quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ClearAllSequenceFilesRequest</span><span class="p">()</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call_async</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">ClearAllSequenceFiles</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">value_from_response</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                               <span class="n">error_from_response</span><span class="o">=</span><span class="n">common_header_errors</span><span class="p">,</span> <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
                               <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>


<div class="viewcode-block" id="ChoreographyClient.build_start_recording_state_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_start_recording_state_request">[docs]</a>    <span class="nd">@staticmethod</span>
    <span class="k">def</span> <span class="nf">build_start_recording_state_request</span><span class="p">(</span><span class="n">duration_seconds</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">continue_session_id</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Generate a StartRecordingStateRequest proto.</span>

<span class="sd">        Args:</span>
<span class="sd">            duration_seconds (float): The duration of the recording request in seconds. This will</span>
<span class="sd">                apply from when the StartRecording rpc is received.</span>
<span class="sd">            continue_session_id (int): If provided, the RPC will continue the recording</span>
<span class="sd">                session associated with that ID.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The full StartRecordingStateRequest proto with fields populated based on the input arguments.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StartRecordingStateRequest</span><span class="p">()</span>
        <span class="n">request</span><span class="o">.</span><span class="n">recording_session_id</span> <span class="o">=</span> <span class="n">continue_session_id</span>
        <span class="k">if</span> <span class="n">duration_seconds</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">continue_recording_duration</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">seconds_to_duration</span><span class="p">(</span><span class="n">duration_seconds</span><span class="p">))</span>
        <span class="k">return</span> <span class="n">request</span></div>

<div class="viewcode-block" id="ChoreographyClient.download_robot_state_log"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.download_robot_state_log">[docs]</a>    <span class="k">def</span> <span class="nf">download_robot_state_log</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">log_type</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Download the manual or automatically collected logs for choreography robot state.</span>

<span class="sd">        Args:</span>
<span class="sd">            log_type(choreography_sequence_pb2.LogType): Type of log, either manual or the automatically</span>
<span class="sd">                generated log for the latest choreography.</span>

<span class="sd">        Returns:</span>
<span class="sd">            A tuple containing the response status (choreography_sequence_pb2.DownloadRobotStateLogResponse.Status) and</span>
<span class="sd">            the choreography_sequence_pb2.ChoreographyStateLog constructed from the streaming response message.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">DownloadRobotStateLogRequest</span><span class="p">(</span><span class="n">log_type</span><span class="o">=</span><span class="n">log_type</span><span class="p">)</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">call</span><span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">_stub</span><span class="o">.</span><span class="n">DownloadRobotStateLog</span><span class="p">,</span>
            <span class="n">request</span><span class="p">,</span>
            <span class="n">value_from_response</span><span class="o">=</span><span class="n">_get_streamed_choreography_state_log</span><span class="p">,</span>  <span class="c1"># Parses streamed response</span>
            <span class="n">error_from_response</span><span class="o">=</span><span class="n">_download_robot_state_log_stream_errors</span><span class="p">,</span>
            <span class="n">copy_request</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
            <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_choreography_time_adjust_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_choreography_time_adjust_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_choreography_time_adjust_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">override_client_start_time</span><span class="p">,</span> <span class="n">time_difference</span><span class="p">,</span>
                                               <span class="n">validity_time</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Generate the ChoreographyTimeAdjustRequest rpc with the timestamp converted into robot time.&quot;&quot;&quot;</span>
        <span class="c1"># Note the client_start_time is a time expressed in the client&#39;s clock for when the choreography sequence should begin.</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographyTimeAdjustRequest</span><span class="p">()</span>
        <span class="k">if</span> <span class="n">override_client_start_time</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">override_start_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_update_timestamp_filter</span><span class="p">(</span><span class="n">override_client_start_time</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">timesync_endpoint</span><span class="p">))</span>
        <span class="k">if</span> <span class="n">time_difference</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">acceptable_time_difference</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">seconds_to_duration</span><span class="p">(</span><span class="n">time_difference</span><span class="p">))</span>
        <span class="k">if</span> <span class="n">validity_time</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">validity_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">seconds_to_duration</span><span class="p">(</span><span class="n">validity_time</span><span class="p">))</span>
        <span class="k">return</span> <span class="n">request</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_execute_choreography_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_execute_choreography_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_execute_choreography_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">choreography_name</span><span class="p">,</span> <span class="n">client_start_time</span><span class="p">,</span>
                                           <span class="n">choreography_starting_slice</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Generate the ExecuteChoreographyRequest rpc with the timestamp converted into robot time.&quot;&quot;&quot;</span>
        <span class="c1"># Note the client_start_time is a time expressed in the client&#39;s clock for when the choreography sequence should begin.</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyRequest</span><span class="p">(</span>
            <span class="n">choreography_sequence_name</span><span class="o">=</span><span class="n">choreography_name</span><span class="p">,</span>
            <span class="n">choreography_starting_slice</span><span class="o">=</span><span class="nb">float</span><span class="p">(</span><span class="n">choreography_starting_slice</span><span class="p">),</span> <span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">client_start_time</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">:</span>
            <span class="n">request</span><span class="o">.</span><span class="n">start_time</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">_update_timestamp_filter</span><span class="p">(</span><span class="n">client_start_time</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">timesync_endpoint</span><span class="p">))</span>
        <span class="k">return</span> <span class="n">request</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_choreography_command_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_choreography_command_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_choreography_command_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">command_list</span><span class="p">,</span> <span class="n">client_end_time</span><span class="p">,</span> <span class="n">lease</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographyCommandRequest</span><span class="p">(</span>
            <span class="n">lease</span><span class="o">=</span><span class="n">lease</span><span class="p">,</span>
            <span class="n">command_end_time</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_update_timestamp_filter</span><span class="p">(</span><span class="n">client_end_time</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">timesync_endpoint</span><span class="p">))</span>
        <span class="c1"># Python list to repeated proto.</span>
        <span class="n">req</span><span class="o">.</span><span class="n">commands</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">command_list</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">req</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_save_sequence_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_save_sequence_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_save_sequence_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sequence_name</span><span class="p">,</span> <span class="n">labels</span><span class="o">=</span><span class="p">[]):</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">SaveSequenceRequest</span><span class="p">(</span><span class="n">sequence_name</span><span class="o">=</span><span class="n">sequence_name</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">add_labels</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">request</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_modify_choreography_info_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_modify_choreography_info_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_modify_choreography_info_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sequence_name</span><span class="p">,</span> <span class="n">add_labels</span><span class="o">=</span><span class="p">[],</span>
                                               <span class="n">remove_labels</span><span class="o">=</span><span class="p">[]):</span>
        <span class="n">request</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ModifyChoreographyInfoRequest</span><span class="p">(</span>
            <span class="n">sequence_name</span><span class="o">=</span><span class="n">sequence_name</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">add_labels</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">add_labels</span><span class="p">)</span>
        <span class="n">request</span><span class="o">.</span><span class="n">remove_labels</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="n">remove_labels</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">request</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_leg_size"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_leg_size">[docs]</a>    <span class="k">def</span> <span class="nf">build_leg_size</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dist_inward</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">dist_outward</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span> <span class="n">dist_forward</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
                       <span class="n">dist_backward</span><span class="o">=</span><span class="mf">0.0</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Build and return a LegSize message from provided dimentions.&quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSize</span><span class="p">(</span><span class="n">distance_inward</span><span class="o">=</span><span class="n">dist_inward</span><span class="p">,</span>
                                                 <span class="n">distance_outward</span><span class="o">=</span><span class="n">dist_outward</span><span class="p">,</span>
                                                 <span class="n">distance_forward</span><span class="o">=</span><span class="n">dist_forward</span><span class="p">,</span>
                                                 <span class="n">distance_backward</span><span class="o">=</span><span class="n">dist_backward</span><span class="p">)</span></div>

<div class="viewcode-block" id="ChoreographyClient.build_leg_size_configuration_request"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.ChoreographyClient.build_leg_size_configuration_request">[docs]</a>    <span class="k">def</span> <span class="nf">build_leg_size_configuration_request</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">front_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">front_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
                                             <span class="n">hind_left_size</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">hind_right_size</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Build a LegSizeConfigurationRequest. </span>

<span class="sd">        Args: </span>
<span class="sd">            front_left_size: New leg configuration dimensions for the front left leg. Either </span>
<span class="sd">                a LegSize message or a list of 4 floats. If None, all config values are set to zero.</span>
<span class="sd">            front_right_size: Same as front_left_size, but for the front right leg.</span>
<span class="sd">            hind_left_size: Same as front_left_size, but for the hind left leg.</span>
<span class="sd">            hind_right_size: Same as front_left_size, but for the hind right leg.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The LegSizeConfigurationRequest message built from provided parameters.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">req</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSizeConfigurationRequest</span><span class="p">()</span>

        <span class="c1"># Check for a list input for each foot.</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">front_left_size</span><span class="p">,</span> <span class="nb">list</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">front_left_size</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
            <span class="n">front_left_size</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size</span><span class="p">(</span><span class="n">front_left_size</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">front_left_size</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
                                                  <span class="n">front_left_size</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">front_left_size</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">front_right_size</span><span class="p">,</span> <span class="nb">list</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">front_right_size</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
            <span class="n">front_right_size</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size</span><span class="p">(</span><span class="n">front_right_size</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">front_right_size</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
                                                   <span class="n">front_right_size</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">front_right_size</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">hind_left_size</span><span class="p">,</span> <span class="nb">list</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">hind_left_size</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
            <span class="n">hind_left_size</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size</span><span class="p">(</span><span class="n">hind_left_size</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">hind_left_size</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
                                                 <span class="n">hind_left_size</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">hind_left_size</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">hind_right_size</span><span class="p">,</span> <span class="nb">list</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">len</span><span class="p">(</span><span class="n">hind_right_size</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
            <span class="n">hind_right_size</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">build_leg_size</span><span class="p">(</span><span class="n">hind_right_size</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">hind_right_size</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
                                                  <span class="n">hind_right_size</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">hind_right_size</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>

        <span class="c1"># Copy the LegSize message for each foot to the request if it was provided and valid.</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">front_left_size</span><span class="p">,</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSize</span><span class="p">):</span>
            <span class="n">req</span><span class="o">.</span><span class="n">front_left_size</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">front_left_size</span><span class="p">)</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">front_right_size</span><span class="p">,</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSize</span><span class="p">):</span>
            <span class="n">req</span><span class="o">.</span><span class="n">front_right_size</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">front_right_size</span><span class="p">)</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">hind_left_size</span><span class="p">,</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSize</span><span class="p">):</span>
            <span class="n">req</span><span class="o">.</span><span class="n">hind_left_size</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">hind_left_size</span><span class="p">)</span>
        <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">hind_right_size</span><span class="p">,</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">LegSize</span><span class="p">):</span>
            <span class="n">req</span><span class="o">.</span><span class="n">hind_right_size</span><span class="o">.</span><span class="n">CopyFrom</span><span class="p">(</span><span class="n">hind_right_size</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">req</span></div>

    <span class="k">def</span> <span class="nf">_update_timestamp_filter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">timestamp</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Set or convert fields of the proto that need timestamps in the robot&#39;s clock.&quot;&quot;&quot;</span>
        <span class="c1"># Input timestamp is a google.protobuf.Timestamp</span>
        <span class="k">if</span> <span class="ow">not</span> <span class="n">timesync_endpoint</span><span class="p">:</span>
            <span class="k">raise</span> <span class="n">NoTimeSyncError</span><span class="p">(</span><span class="s2">&quot;[choreography service] No timesync endpoint set for the robot.&quot;</span><span class="p">)</span>
        <span class="n">converter</span> <span class="o">=</span> <span class="n">_TimeConverter</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">timesync_endpoint</span><span class="p">)</span>
        <span class="k">return</span> <span class="n">converter</span><span class="o">.</span><span class="n">robot_timestamp_from_local_secs</span><span class="p">(</span><span class="n">timestamp</span><span class="p">)</span></div>


<div class="viewcode-block" id="AnimationUploadHelper"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.AnimationUploadHelper">[docs]</a><span class="k">class</span> <span class="nc">AnimationUploadHelper</span><span class="p">:</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Helper class to reduce re-uploading animations to a robot multiple times.</span>

<span class="sd">    This class will generate a hash (unique ID built from the animation protobuf</span>
<span class="sd">    message&#39;s contents) for each animation proto, and include this hash when initially</span>
<span class="sd">    uploading animations. It will track the animations sent to the robot and the hashes, and</span>
<span class="sd">    only sends RPCs to upload an animation when the incoming animation proto is different</span>
<span class="sd">    from the one on robot.</span>

<span class="sd">    It initializes the set of known animations on robot already by using the ListAllMoves</span>
<span class="sd">    RPC and reading the existing animation names and hashes.</span>

<span class="sd">    The hash function is generated using a library which guarantees consistency, even when</span>
<span class="sd">    restarting the program. As well, the hash is built from the serialized protobuf, and</span>
<span class="sd">    proto guarantees that within the language that the serialized message will be consistent.</span>

<span class="sd">    Args:</span>
<span class="sd">        robot (Robot sdk instance): The robot to upload animations to.</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="n">ANIMATION_MOVE_PREFIX</span> <span class="o">=</span> <span class="s2">&quot;animation::&quot;</span>

    <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">robot</span><span class="p">):</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">robot</span> <span class="o">=</span> <span class="n">robot</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">choreography_client</span> <span class="o">=</span> <span class="n">robot</span><span class="o">.</span><span class="n">ensure_client</span><span class="p">(</span><span class="n">ChoreographyClient</span><span class="o">.</span><span class="n">default_service_name</span><span class="p">)</span>

        <span class="c1"># Track animation name and current hash on robot.</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">animation_name_to_generated_id</span> <span class="o">=</span> <span class="p">{}</span>

        <span class="c1"># Initialize the list of known animations and their hashes based on the robot&#39;s</span>
        <span class="c1"># ListAllMoves RPC response.</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">initialize</span><span class="p">()</span>

<div class="viewcode-block" id="AnimationUploadHelper.initialize"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.AnimationUploadHelper.initialize">[docs]</a>    <span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Determine which animations are already uploaded on robot.&quot;&quot;&quot;</span>
        <span class="c1"># Get a list of all the existing animations on robot.</span>
        <span class="n">initial_move_list</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">choreography_client</span><span class="o">.</span><span class="n">list_all_moves</span><span class="p">()</span>

        <span class="c1"># Iterate over the list of moves the robot currently has. Track any animation moves</span>
        <span class="c1"># by name and current animation hash. Any moves uploaded using this helper class will</span>
        <span class="c1"># save the animation&#39;s hash in this dictionary and compare new animation hashes to</span>
        <span class="c1"># determine</span>
        <span class="k">for</span> <span class="n">move</span> <span class="ow">in</span> <span class="n">initial_move_list</span><span class="o">.</span><span class="n">moves</span><span class="p">:</span>
            <span class="k">if</span> <span class="n">AnimationUploadHelper</span><span class="o">.</span><span class="n">ANIMATION_MOVE_PREFIX</span> <span class="ow">in</span> <span class="n">move</span><span class="o">.</span><span class="n">name</span><span class="p">:</span>
                <span class="c1"># Use the move name without the prefix so that subsequent attempts to upload</span>
                <span class="c1"># that move will still match correctly.</span>
                <span class="n">move_name</span> <span class="o">=</span> <span class="n">move</span><span class="o">.</span><span class="n">name</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="n">AnimationUploadHelper</span><span class="o">.</span><span class="n">ANIMATION_MOVE_PREFIX</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span>
                <span class="n">gen_id</span> <span class="o">=</span> <span class="n">move</span><span class="o">.</span><span class="n">animated_move_generated_id</span><span class="o">.</span><span class="n">value</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">animation_name_to_generated_id</span><span class="p">[</span><span class="n">move_name</span><span class="p">]</span> <span class="o">=</span> <span class="n">gen_id</span></div>

<div class="viewcode-block" id="AnimationUploadHelper.upload_animated_move"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.AnimationUploadHelper.upload_animated_move">[docs]</a>    <span class="k">def</span> <span class="nf">upload_animated_move</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">animation</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Uploads the animation to robot if the animation protobuf has changed.</span>

<span class="sd">        This will only send an UploadAnimatedMove RPC if the incoming animation</span>
<span class="sd">        has a new hash that differs from the current hash for this animation on robot, which</span>
<span class="sd">        indicates that the animation protobuf has changed since the last one uploaded to robot.</span>

<span class="sd">        Args:</span>
<span class="sd">            animation(choreography_sequence_pb2.Animation): Animation to maybe upload.</span>

<span class="sd">        Returns:</span>
<span class="sd">            The UploadAnimateMoveResponse protobuf message if the animation is actually sent.</span>
<span class="sd">            If the animation protobuf has not changed and is not sent to the robot, then this</span>
<span class="sd">            function returns None.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="n">generated_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">generate_animation_id</span><span class="p">(</span><span class="n">animation</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">animation</span><span class="o">.</span><span class="n">name</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">animation_name_to_generated_id</span><span class="p">:</span>
            <span class="n">gen_id_on_robot</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">animation_name_to_generated_id</span><span class="p">[</span><span class="n">animation</span><span class="o">.</span><span class="n">name</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">gen_id_on_robot</span> <span class="o">==</span> <span class="n">generated_id</span><span class="p">:</span>
                <span class="c1"># Exit early without uploading the animation since it already exists on robot.</span>
                <span class="k">return</span> <span class="kc">None</span>
        <span class="n">result</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">choreography_client</span><span class="o">.</span><span class="n">upload_animated_move</span><span class="p">(</span><span class="n">animation</span><span class="p">,</span> <span class="n">generated_id</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
        <span class="k">if</span> <span class="n">result</span><span class="o">.</span><span class="n">status</span> <span class="o">==</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span>
            <span class="c1"># Add the move name to the tracked list.</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">animation_name_to_generated_id</span><span class="p">[</span><span class="n">animation</span><span class="o">.</span><span class="n">name</span><span class="p">]</span> <span class="o">=</span> <span class="n">generated_id</span>
        <span class="k">return</span> <span class="n">result</span></div>

<div class="viewcode-block" id="AnimationUploadHelper.generate_animation_id"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.AnimationUploadHelper.generate_animation_id">[docs]</a>    <span class="k">def</span> <span class="nf">generate_animation_id</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">animation_proto</span><span class="p">):</span>
<span class="w">        </span><span class="sd">&quot;&quot;&quot;Serialize an Animation protobuf message and create a hash from the binary string.</span>

<span class="sd">        NOTE: Protobuf&#39;s serialization will not be consistent across protobuf versions or</span>
<span class="sd">        even just different languages serializing the same protobuf message. This means that for a</span>
<span class="sd">        single protobuf message, there could be multiple different serializations. This is ok for the</span>
<span class="sd">        use-case of the AnimationUploadHelper since the ids are only used for a specific</span>
<span class="sd">        &quot;session&quot; of Choreographer and the robot&#39;s boot session. These are not meant to be the same</span>
<span class="sd">        for forever and ever due to the potential inconsistencies mentioned, and should not be used</span>
<span class="sd">        with that expectation.</span>

<span class="sd">        Further, if a single animation proto does not generate the same ID for one &quot;session&quot;, then</span>
<span class="sd">        it will just be re-uploaded and processed by the robot again.</span>

<span class="sd">        Args:</span>
<span class="sd">            animation_proto(choreography_sequence_pb2.Animation): Animation to generate a hash for.</span>

<span class="sd">        Returns:</span>
<span class="sd">            A string representing a unique hash built from the animation proto.</span>
<span class="sd">        &quot;&quot;&quot;</span>
        <span class="k">return</span> <span class="n">hashlib</span><span class="o">.</span><span class="n">sha1</span><span class="p">(</span><span class="n">animation_proto</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">())</span><span class="o">.</span><span class="n">hexdigest</span><span class="p">()</span></div></div>


<div class="viewcode-block" id="InvalidUploadedChoreographyError"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.InvalidUploadedChoreographyError">[docs]</a><span class="k">class</span> <span class="nc">InvalidUploadedChoreographyError</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The uploaded choreography is invalid and unable to be performed.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RobotCommandIssuesError"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.RobotCommandIssuesError">[docs]</a><span class="k">class</span> <span class="nc">RobotCommandIssuesError</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;A problem occurred when issuing the robot command containing the dance.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="LeaseError"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.LeaseError">[docs]</a><span class="k">class</span> <span class="nc">LeaseError</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Incorrect or invalid leases for data acquisition. Check the lease use results.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="AnimationValidationFailedError"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.AnimationValidationFailedError">[docs]</a><span class="k">class</span> <span class="nc">AnimationValidationFailedError</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The uploaded animation file is invalid and cannot be used in choreography sequences.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="NoRecordedInformation"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.NoRecordedInformation">[docs]</a><span class="k">class</span> <span class="nc">NoRecordedInformation</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The choreography service has no logged robot state data.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="UnknownRecordingSessionId"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.UnknownRecordingSessionId">[docs]</a><span class="k">class</span> <span class="nc">UnknownRecordingSessionId</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The recording request contains an unknown recording session ID.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="RecordingBufferFull"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.RecordingBufferFull">[docs]</a><span class="k">class</span> <span class="nc">RecordingBufferFull</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The recording buffer is full and the current manual log will be truncated.&quot;&quot;&quot;</span></div>


<div class="viewcode-block" id="IncompleteData"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.IncompleteData">[docs]</a><span class="k">class</span> <span class="nc">IncompleteData</span><span class="p">(</span><span class="n">ResponseError</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;The recording buffer filled up, the returned log will be truncated.&quot;&quot;&quot;</span></div>


<span class="n">_EXECUTE_CHOREOGRAPHY_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_EXECUTE_CHOREOGRAPHY_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyResponse</span><span class="o">.</span><span class="n">STATUS_INVALID_UPLOADED_CHOREOGRAPHY</span><span class="p">:</span>
        <span class="p">(</span><span class="n">InvalidUploadedChoreographyError</span><span class="p">,</span> <span class="n">InvalidUploadedChoreographyError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyResponse</span><span class="o">.</span><span class="n">STATUS_ROBOT_COMMAND_ISSUES</span><span class="p">:</span>
        <span class="p">(</span><span class="n">RobotCommandIssuesError</span><span class="p">,</span> <span class="n">RobotCommandIssuesError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyResponse</span><span class="o">.</span><span class="n">STATUS_LEASE_ERROR</span><span class="p">:</span>
        <span class="p">(</span><span class="n">LeaseError</span><span class="p">,</span> <span class="n">LeaseError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_lease_use_result_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_execute_choreography_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return an exception based on response from ExecuteChoreography RPC, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span>
        <span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
        <span class="n">status_to_string</span><span class="o">=</span><span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ExecuteChoreographyResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
        <span class="n">status_to_error</span><span class="o">=</span><span class="n">_EXECUTE_CHOREOGRAPHY_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_UPLOAD_ANIMATED_MOVE_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_UPLOAD_ANIMATED_MOVE_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveResponse</span><span class="o">.</span><span class="n">STATUS_ANIMATION_VALIDATION_FAILED</span><span class="p">:</span>
        <span class="p">(</span><span class="n">AnimationValidationFailedError</span><span class="p">,</span> <span class="n">AnimationValidationFailedError</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_upload_animated_move_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return an exception based on response from UploadAnimatedMove RPC, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span>
        <span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
        <span class="n">status_to_string</span><span class="o">=</span><span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">UploadAnimatedMoveResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
        <span class="n">status_to_error</span><span class="o">=</span><span class="n">_UPLOAD_ANIMATED_MOVE_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="n">_START_RECORDING_STATE_STATUS_TO_ERROR</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="p">(</span><span class="n">ResponseError</span><span class="p">,</span> <span class="kc">None</span><span class="p">))</span>
<span class="n">_START_RECORDING_STATE_STATUS_TO_ERROR</span><span class="o">.</span><span class="n">update</span><span class="p">({</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StartRecordingStateResponse</span><span class="o">.</span><span class="n">STATUS_OK</span><span class="p">:</span> <span class="p">(</span><span class="kc">None</span><span class="p">,</span> <span class="kc">None</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StartRecordingStateResponse</span><span class="o">.</span><span class="n">STATUS_UNKNOWN_RECORDING_SESSION_ID</span><span class="p">:</span>
        <span class="p">(</span><span class="n">UnknownRecordingSessionId</span><span class="p">,</span> <span class="n">UnknownRecordingSessionId</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
    <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StartRecordingStateResponse</span><span class="o">.</span><span class="n">STATUS_RECORDING_BUFFER_FULL</span><span class="p">:</span>
        <span class="p">(</span><span class="n">RecordingBufferFull</span><span class="p">,</span> <span class="n">RecordingBufferFull</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">),</span>
<span class="p">})</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_start_recording_state_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return an exception based on response from StartRecordingState RPC, None if no error.&quot;&quot;&quot;</span>
    <span class="k">return</span> <span class="n">error_factory</span><span class="p">(</span>
        <span class="n">response</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span>
        <span class="n">status_to_string</span><span class="o">=</span><span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">StartRecordingStateResponse</span><span class="o">.</span><span class="n">Status</span><span class="o">.</span><span class="n">Name</span><span class="p">,</span>
        <span class="n">status_to_error</span><span class="o">=</span><span class="n">_START_RECORDING_STATE_STATUS_TO_ERROR</span><span class="p">)</span>


<span class="nd">@handle_common_header_errors</span>
<span class="nd">@handle_unset_status_error</span><span class="p">(</span><span class="n">unset</span><span class="o">=</span><span class="s1">&#39;STATUS_UNKNOWN&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">_download_robot_state_log_stream_errors</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Return a custom exception based on download robot state log streaming response, None if no error.&quot;&quot;&quot;</span>
    <span class="c1"># Iterate through the response since the download request responds with a stream.</span>
    <span class="k">for</span> <span class="n">resp</span> <span class="ow">in</span> <span class="n">response</span><span class="p">:</span>
        <span class="c1"># Handle error statuses from the request.</span>
        <span class="k">if</span> <span class="p">(</span><span class="n">resp</span><span class="o">.</span><span class="n">status</span> <span class="o">==</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">DownloadRobotStateLogResponse</span><span class="o">.</span>
                <span class="n">STATUS_NO_RECORDED_INFORMATION</span><span class="p">):</span>
            <span class="k">return</span> <span class="n">NoRecordedInformation</span><span class="p">(</span><span class="n">response</span><span class="o">=</span><span class="n">resp</span><span class="p">,</span> <span class="n">error_message</span><span class="o">=</span><span class="n">NoRecordedInformation</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">)</span>
    <span class="c1"># All responses (in the iterator) had status_ok</span>
    <span class="k">return</span> <span class="kc">None</span>


<span class="sd">&#39;&#39;&#39;</span>
<span class="sd">Static helper methods.</span>
<span class="sd">&#39;&#39;&#39;</span>


<span class="k">def</span> <span class="nf">_get_streamed_choreography_state_log</span><span class="p">(</span><span class="n">response</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Reads a streamed response to recreate a ChoreographyStateLog proto.</span>

<span class="sd">    Args:</span>
<span class="sd">        response(choreography_sequence_pb2.DownloadRobotStateLogResponse): Streamed response with the</span>
<span class="sd">            choreography log.</span>

<span class="sd">    Returns:</span>
<span class="sd">        A tuple containing the response status (choreography_sequence_pb2.DownloadRobotStateLogResponse.Status) and</span>
<span class="sd">        the choreography_sequence_pb2.ChoreographyStateLog constructed from the streaming response message.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">data</span> <span class="o">=</span> <span class="s1">&#39;&#39;</span>
    <span class="n">num_chunks</span> <span class="o">=</span> <span class="mi">0</span>
    <span class="n">initial_status</span> <span class="o">=</span> <span class="kc">None</span>
    <span class="k">for</span> <span class="n">resp</span> <span class="ow">in</span> <span class="n">response</span><span class="p">:</span>
        <span class="k">if</span> <span class="n">num_chunks</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
            <span class="n">initial_status</span> <span class="o">=</span> <span class="n">resp</span><span class="o">.</span><span class="n">status</span>
            <span class="n">data</span> <span class="o">=</span> <span class="n">resp</span><span class="o">.</span><span class="n">chunk</span><span class="o">.</span><span class="n">data</span>
        <span class="k">else</span><span class="p">:</span>
            <span class="n">data</span> <span class="o">+=</span> <span class="n">resp</span><span class="o">.</span><span class="n">chunk</span><span class="o">.</span><span class="n">data</span>
        <span class="n">num_chunks</span> <span class="o">+=</span> <span class="mi">1</span>
    <span class="n">choreography_log</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographyStateLog</span><span class="p">()</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">num_chunks</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">):</span>
        <span class="n">choreography_log</span><span class="o">.</span><span class="n">ParseFromString</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
    <span class="k">return</span> <span class="p">(</span><span class="n">initial_status</span><span class="p">,</span> <span class="n">choreography_log</span><span class="p">)</span>


<div class="viewcode-block" id="load_choreography_sequence_from_binary_file"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.load_choreography_sequence_from_binary_file">[docs]</a><span class="k">def</span> <span class="nf">load_choreography_sequence_from_binary_file</span><span class="p">(</span><span class="n">file_path</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Read a choreography sequence file into a protobuf ChoreographySequence message.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">file_path</span><span class="p">):</span>
        <span class="n">LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;File not found at: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>
        <span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="s2">&quot;File not found at: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>

    <span class="n">choreography_sequence</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographySequence</span><span class="p">()</span>
    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="s2">&quot;rb&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
        <span class="n">data</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
        <span class="n">choreography_sequence</span><span class="o">.</span><span class="n">ParseFromString</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>

    <span class="k">return</span> <span class="n">choreography_sequence</span></div>


<div class="viewcode-block" id="load_choreography_sequence_from_txt_file"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.load_choreography_sequence_from_txt_file">[docs]</a><span class="k">def</span> <span class="nf">load_choreography_sequence_from_txt_file</span><span class="p">(</span><span class="n">file_path</span><span class="p">):</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">file_path</span><span class="p">):</span>
        <span class="n">LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;File not found at: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>
        <span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="s2">&quot;File not found at: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>

    <span class="n">choreography_sequence</span> <span class="o">=</span> <span class="n">choreography_sequence_pb2</span><span class="o">.</span><span class="n">ChoreographySequence</span><span class="p">()</span>
    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="s2">&quot;r&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
        <span class="n">data</span> <span class="o">=</span> <span class="n">f</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
        <span class="n">text_format</span><span class="o">.</span><span class="n">Merge</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">choreography_sequence</span><span class="p">)</span>

    <span class="k">return</span> <span class="n">choreography_sequence</span></div>


<div class="viewcode-block" id="save_choreography_sequence_to_file"><a class="viewcode-back" href="../../../../python/bosdyn-choreography-client/src/bosdyn/choreography/client/choreography.html#bosdyn.choreography.client.choreography.save_choreography_sequence_to_file">[docs]</a><span class="k">def</span> <span class="nf">save_choreography_sequence_to_file</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="n">file_name</span><span class="p">,</span> <span class="n">choreography</span><span class="p">):</span>
<span class="w">    </span><span class="sd">&quot;&quot;&quot;Saves a choreography sequence to a file.&quot;&quot;&quot;</span>
    <span class="k">if</span> <span class="p">(</span><span class="n">file_name</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="nb">len</span><span class="p">(</span><span class="n">file_name</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">):</span>
        <span class="n">LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Invalid file name, cannot save choreography sequence.&quot;</span><span class="p">)</span>
        <span class="k">raise</span> <span class="ne">IOError</span><span class="p">(</span><span class="s2">&quot;Invalid file name, cannot save choreography sequence.&quot;</span><span class="p">)</span>

    <span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">file_path</span><span class="p">):</span>
        <span class="n">LOGGER</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Path(</span><span class="si">%s</span><span class="s2">) to save file does not exist. Creating it.&quot;</span> <span class="o">%</span> <span class="n">file_path</span><span class="p">)</span>
        <span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>

    <span class="n">choreography_sequence_bytes</span> <span class="o">=</span> <span class="n">choreography</span><span class="o">.</span><span class="n">SerializeToString</span><span class="p">()</span>
    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">file_path</span><span class="p">,</span> <span class="n">file_name</span><span class="p">)),</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
        <span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">choreography_sequence_bytes</span><span class="p">)</span></div>
</pre></div>

           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
      
      &copy; Copyright 2025 Boston Dynamics. All rights reserved.
      <a href="https://www.bostondynamics.com/privacy-policy">Privacy Policy</a> | 
      <a href="https://www.bostondynamics.com/terms">Terms of Use</a>

    </p>
  </div> 

</footer>
        </div>
      </div>
    </section>
  </div>
  <script>
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(false);
      });
  </script>
    <!-- Theme Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-1"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'UA-XXXXXXX-1', {
          'anonymize_ip': false,
      });
    </script> 

</body>
</html>